package com.tvunetworks.center.device.service;

import com.tvunetworks.center.device.model.CustomizedTShareAccount;

import java.util.List;
/**
 * @program: tvucc-instance
 * @author lebronchen
 * @create: 2019-02-28 16:53
 **/
public interface CustomizedTShareAccountService {

    /**
     * 检查 T 自动推流账号是否存在，已存在则不用再创建
     * 因为推流地址会根据 deviceName 变化，所以这里需要 peerId 和 deviceName 一起做匹配
     * @param peerId peerId
     * @param      deviceName deviceName
     * @return CustomizedTShareAccount
     */
    CustomizedTShareAccount getTShareAccountExist(String peerId, String deviceName);

    /**
     *
     * @param customizedTShareAccount customizedTShareAccount
     * @return CustomizedTShareAccount
     */
    CustomizedTShareAccount addTShareAccount(CustomizedTShareAccount customizedTShareAccount);

    /**
     *
     * @param shareId shareId
     * @return CustomizedTShareAccount
     */
    CustomizedTShareAccount getByShareId(String shareId);

    /**
     *
     * @param shareId shareId
     * @return boolean
     */
    boolean isFixedShareAccount(String shareId);

    /**
     * 查询所有 Fixed ShareIds
     * @return List
     */
    List<String> listAllShareIds();

    /**
     *
     * @param id  id
     */
    void deleteById(String id);
}
